#!/bin/bash

# lint with strict mode
gjslint -r --strict                                    \
    src/model/Task.js                                  \
    src/model/Story.js                                 \
    src/Application.js                                 \

#setup my build dirs
rm -rfd build
mkdir build

java -jar closure/compiler/compiler.jar               \
    --js closure/library/closure/closure/goog/base.js         \
    --js src/model/Task.js                                  \
    --js src/model/Story.js                                 \
    --js src/Application.js                                 \
    --compilation_level=ADVANCED_OPTIMIZATIONS              \
    --warning_level=VERBOSE                                 \
    --jscomp_warning=checkTypes                             \
    --accept_const_keyword                                  \
    --formatting=pretty_print                               \
    --formatting=print_input_delimiter                      \
    > build/main.min.js

